<template>
  <div class="app-container">
    <el-card>
      <el-button type="primary" @click="openPrintDialog">查看</el-button>
    </el-card>

    <q8dquality-Workorder-Print
      :visible="addDialogPrint.visible"
      :title="addDialogPrint.title"
      :data="addDialogPrint.data"
      @change-visible="changeVisible"
    />
  </div>
</template>
<script setup lang="ts">
defineOptions({
  name: "QMS8DQ8DQUALITYWORKORDERMU",
  inheritAttrs: false,
});

// 打印弹窗--定义
const addDialogPrint = reactive({
  visible: false,
  title: "",
  data: {},
});

// 打印弹窗--打开
const openPrintDialog = () => {
  addDialogPrint.title = "工单查看";
  addDialogPrint.data = { id: "1844945562761859074" };
  addDialogPrint.visible = true;
};

// 打印弹窗--关闭
function changeVisible(value: boolean) {
  addDialogPrint.visible = value;
  if (!value) {
    addDialogPrint.data = {};
  }
}
</script>
<style scoped lang="scss"></style>
